﻿#region File Header
/***********************************************************************
 * Copyright © 2012 Beals Software
 * All Rights Reserved
************************************************************************
Author: Donald Beals
Date: Month Day, Year
Description: TODO: Write a description of this file here.
****************************** Change Log ******************************
MM.DD.YY - Created initial file. (dbeals)
***********************************************************************/
#endregion

#region Using Statements
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
#endregion

namespace PolygonBasedPathfinding
{
	/// <summary>
	/// 
	/// </summary>
	internal sealed class PathTreeNode
	{
		#region Variables
		public Point Position = Point.Zero;
		public PathTreeNode Parent = null;
		public int Weight = 0;
		#endregion

		#region Constructors
		public PathTreeNode()
		{
		}

		public PathTreeNode(Point position, PathTreeNode parent, int weight)
		{
			this.Position = position;
			this.Parent = parent;
			this.Weight = weight;
		}

		public PathTreeNode(int column, int row, PathTreeNode parent, int weight)
			: this(new Point(column, row), parent, weight)
		{
		}
		#endregion

		#region Methods
		public override string ToString()
		{
			return string.Format("X:{0} Y:{1} Weight:{2} Parent:{3}", Position.X, Position.Y, Weight, Parent == null ? "null" : "PathTreeNode");
		}
		#endregion
	};
}
